<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib  uri="/struts-tags" prefix="s" %>
<%@taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>

<html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title><tiles:insertAttribute name="title" /></title>   

        <link href="<s:url value="/css/style.css"/>" rel="stylesheet" type="text/css"/>
        <link href="<s:url value="/css/bootstrap.min.css"/>" rel="stylesheet" type="text/css"/>
        <link href="<s:url value="/css/bootstrap-responsive.min.css"/>" rel="stylesheet" type="text/css"/>

        <script src="<s:url value="/js/jquery-1.8.3.min.js"/>" type="text/javascript" ></script>
        <script src="<s:url value="/js/bootstrap.min.js"/>" type="text/javascript" ></script>
    </head>
    <body>
        <div class="container">
            <div class="row">
                <a href="<s:url action="index" namespace="/"></s:url>">
                    <img width="162" height="60" alt="log" src="<s:url value="/img/logo.jpg"/>">
                </a>
                <div class="navbar" style="float: right;">
                    <ul class="nav pull-right">
                        <s:if test="%{#session['user.username'] == null || #session['user.username'] eq ''}">
                            <li class="dropdown">
                                <a data-toggle="dropdown" href="#" class="dropdown-toggle">Login <strong class="caret"></strong></a>
                                <div class="dropdown-menu loginbox">
                                    <s:form namespace="users" action="login" method="post" cssClass="form-login"  theme="simple">
                                        <s:textfield name="username" cssClass="input-block-level" placeholder="Username"/> 
                                        <s:password name="password" cssClass="input-block-level" placeholder="Password" />     
                                        <s:submit value="Login" cssClass="btn btn-primary" type="button"/>
                                    </s:form>
                                </div>
                            </li>
                        </s:if>
                        <s:else>
                            <li>
                                <div style="padding: 10px 15px;">
                                    <i class="icon-user"></i><b>User Name : <s:property value="#session['user.username']" /></b>
                                </div>
                            </li>
                            <li>
                                <a href="<s:url action="logout" namespace="/"></s:url>"><i class="icon-off"></i>Logout</a>
                                </li>
                            
                    </s:else>
                    </ul>
                </div>
            </div>
        </div>

        <div class="navbar navbar-inverse navbar-static-top">
            <div class="navbar-inner">
                <div class="container">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </a>
                </div>
            </div>
        </div>

    

    <div class="container" style="height: 485px;">
        <tiles:insertAttribute name="content" /> 

    </div> <!-- /container -->
    <footer class="footer">
        <div class="container">
            <tiles:insertAttribute name="footer" />
        </div>
    </footer>




</body>
</html>
